#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:do_flask2.py
# author:Jackiex
# datetime:2023/5/22 11:21
# software: PyCharm

"""
this is function  description 
"""

from flask import Flask,render_template

app = Flask(__name__)


@app.route('/myweb')
def myweb():
    return render_template('hello.html')



@app.route('/data')
def data():
    user_name = 'HHHHH'
    return render_template('hellodata.htm',name=user_name)



'''
那如何传递多个数据到前端呢？
'''

@app.route('/datas')
def datas():
    student = {
        'username': "jackiex",
        'age': "18",
        'gender': "男",
        'flag': "王者",
        'hero': "猴子",
        'person': "dell",
        'wwwurl': {
            'baidu': 'www.baidu.com',
            'google': 'www.google.com'
        }
    }

    return render_template('datas.html',**student)



if __name__ == '__main__':
    app.run(port=5000)
